package com.pe1n.yangtaopai.bean;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by My on 2016/11/23.
 */

public class LeftMenuBean {

    /**
     * status : 200
     * msg : 加载成功
     * data : [{"id":"1","c_name":"美妆个护","subs":[{"id":"6","c_name":"面部护理","subs":[{"id":"36","c_name":"卸妆"},{"id":"37","c_name":"去角质"},{"id":"38","c_name":"洁面"},{"id":"39","c_name":"化妆水"},{"id":"40","c_name":"面部精华"},{"id":"41","c_name":"贴片型面膜"},{"id":"42","c_name":"涂抹型面膜"},{"id":"43","c_name":"乳液"},{"id":"44","c_name":"面霜"},{"id":"45","c_name":"防晒/修护"},{"id":"46","c_name":"眼部护理"},{"id":"47","c_name":"唇部护理"},{"id":"48","c_name":"美容油"}]},{"id":"7","c_name":"时尚彩妆","subs":[{"id":"49","c_name":"散粉"},{"id":"50","c_name":"腮红"},{"id":"51","c_name":"眉妆"},{"id":"52","c_name":"眼影"},{"id":"53","c_name":"眼线"},{"id":"54","c_name":"睫毛膏"},{"id":"55","c_name":"口红/唇蜜"},{"id":"56","c_name":"隔离/妆前"},{"id":"57","c_name":"粉底/BB"},{"id":"58","c_name":"遮瑕"},{"id":"242","c_name":"彩妆套装"}]},{"id":"8","c_name":"身体护理","subs":[{"id":"59","c_name":"身体清洁"},{"id":"60","c_name":"润体"},{"id":"61","c_name":"手足护理"}]},{"id":"9","c_name":"洗发护发","subs":[{"id":"63","c_name":"洗发水"},{"id":"64","c_name":"护发素"},{"id":"65","c_name":"护发精华"},{"id":"66","c_name":"生发"}]},{"id":"10","c_name":"美妆工具","subs":[{"id":"67","c_name":"美容仪器"},{"id":"68","c_name":"彩妆小工具"},{"id":"69","c_name":"护肤工具"},{"id":"196","c_name":"其他美妆工具"}]},{"id":"11","c_name":"个人护理","subs":[{"id":"70","c_name":"口腔护理"},{"id":"71","c_name":"眼罩"},{"id":"72","c_name":"卫生巾"}]}]},{"id":"2","c_name":"母婴用品","subs":[{"id":"12","c_name":"尿裤湿巾","subs":[{"id":"73","c_name":"纸尿裤"},{"id":"74","c_name":"尿布兜"},{"id":"75","c_name":"婴儿湿巾"}]},{"id":"13","c_name":"工具喂养","subs":[{"id":"76","c_name":"奶瓶奶嘴"},{"id":"77","c_name":"婴幼儿餐具"},{"id":"78","c_name":"学饮杯"},{"id":"79","c_name":"儿童水壶"},{"id":"80","c_name":"餐具消毒"}]},{"id":"14","c_name":"宝宝洗护","subs":[{"id":"82","c_name":"洗发沐浴"},{"id":"84","c_name":"宝宝护肤"},{"id":"85","c_name":"洗护工具"},{"id":"86","c_name":"防晒爽身"},{"id":"87","c_name":"驱蚊止痒"},{"id":"88","c_name":"宝宝口腔护理"}]},{"id":"15","c_name":"辅食健康","subs":[{"id":"90","c_name":"零食辅食"},{"id":"91","c_name":"宝宝健康"}]},{"id":"16","c_name":"童装玩具","subs":[{"id":"93","c_name":"童装"},{"id":"94","c_name":"童鞋"},{"id":"95","c_name":"婴幼玩具"},{"id":"96","c_name":"儿童玩具"},{"id":"203","c_name":"书包/小物"}]},{"id":"17","c_name":"孕妈专区","subs":[{"id":"97","c_name":"孕期营养"},{"id":"98","c_name":"孕妇饮品"},{"id":"99","c_name":"妊娠纹霜"},{"id":"100","c_name":"防溢乳垫"},{"id":"101","c_name":"服饰配件"},{"id":"102","c_name":"产后塑身"},{"id":"103","c_name":"吸奶储奶"}]},{"id":"18","c_name":"家居外出","subs":[{"id":"105","c_name":"如厕用品"},{"id":"106","c_name":"抱带背带"},{"id":"107","c_name":"家居安全"}]}]},{"id":"3","c_name":"箱包配饰","subs":[{"id":"19","c_name":"箱包","subs":[{"id":"110","c_name":"单肩包"},{"id":"111","c_name":"双肩包"},{"id":"112","c_name":"钱包"},{"id":"190","c_name":"拉杆箱"},{"id":"191","c_name":"电脑包"}]},{"id":"20","c_name":"配饰","subs":[{"id":"113","c_name":"耳饰"},{"id":"114","c_name":"眼镜"},{"id":"192","c_name":"戒指"},{"id":"193","c_name":"项链"},{"id":"194","c_name":"手链/手镯"},{"id":"241","c_name":"裤袜/丝袜"}]}]},{"id":"4","c_name":"营养健康","subs":[{"id":"22","c_name":"成人用品","subs":[{"id":"118","c_name":"安全避孕 "}]},{"id":"23","c_name":"眼部健康","subs":[{"id":"124","c_name":"护理液"}]},{"id":"24","c_name":"日常营养","subs":[{"id":"125","c_name":"维生素"},{"id":"126","c_name":"蜂制品"},{"id":"127","c_name":"蛋白质"},{"id":"128","c_name":"DHA·EPA"},{"id":"129","c_name":"矿物质"},{"id":"130","c_name":"乳酸菌"},{"id":"131","c_name":"氨基酸"},{"id":"132","c_name":"青汁"},{"id":"195","c_name":"健康茶"},{"id":"204","c_name":"银杏叶素"}]},{"id":"25","c_name":"女性必备","subs":[{"id":"133","c_name":"丰胸"},{"id":"134","c_name":"胶原蛋白"},{"id":"135","c_name":"美白养颜"},{"id":"136","c_name":"更年期"},{"id":"137","c_name":"抗衰老"}]},{"id":"26","c_name":"纤体瘦身","subs":[{"id":"138","c_name":"热控燃脂"},{"id":"139","c_name":"酵素"},{"id":"140","c_name":"左旋肉碱"},{"id":"141","c_name":"瘦身饮食"}]},{"id":"27","c_name":"男性必备","subs":[{"id":"142","c_name":"玛卡"},{"id":"143","c_name":"护肝/解酒"}]},{"id":"28","c_name":"关爱中老年","subs":[{"id":"145","c_name":"降胆固醇"},{"id":"147","c_name":"降三高"},{"id":"148","c_name":"骨骼/关节"},{"id":"149","c_name":"助眠/安神"}]},{"id":"29","c_name":"家庭必备","subs":[{"id":"152","c_name":"口罩"},{"id":"153","c_name":"矫正/护具"},{"id":"155","c_name":"健康测量"}]}]},{"id":"5","c_name":"综合日用","subs":[{"id":"30","c_name":"厨卫用品","subs":[{"id":"156","c_name":"厨具餐具"},{"id":"157","c_name":"厨房清洁"},{"id":"158","c_name":"卫生间清洁"}]},{"id":"31","c_name":"日用杂货","subs":[{"id":"159","c_name":"纸品湿巾"},{"id":"161","c_name":"家纺"},{"id":"162","c_name":"家居好物"},{"id":"163","c_name":"衣物清洁"},{"id":"164","c_name":"芳香除臭"},{"id":"165","c_name":"驱虫用品"},{"id":"166","c_name":"萌宠生活"},{"id":"189","c_name":"保温杯"}]},{"id":"32","c_name":"食品饮料","subs":[{"id":"167","c_name":"糖果巧克力"},{"id":"169","c_name":"薯片薯条"},{"id":"170","c_name":"饼干仙贝"},{"id":"171","c_name":"方便速食"},{"id":"172","c_name":"调味料"},{"id":"173","c_name":"冲泡茶饮"},{"id":"202","c_name":"其他食品"}]},{"id":"33","c_name":"小家电","subs":[{"id":"174","c_name":"厨房家电"},{"id":"175","c_name":"电饭煲"},{"id":"176","c_name":"温水洗净坐便器"},{"id":"177","c_name":"吹风机"},{"id":"178","c_name":"剃须刀"},{"id":"179","c_name":"其他电器"}]},{"id":"34","c_name":"动漫文具","subs":[{"id":"181","c_name":"文具"},{"id":"183","c_name":"手帐"}]},{"id":"35","c_name":"电子产品","subs":[{"id":"184","c_name":"数码周边"},{"id":"185","c_name":"耳机耳麦"},{"id":"186","c_name":"智能设备"}]}]}]
     */

    @SerializedName("status")
    private int status;
    @SerializedName("msg")
    private String msg;
    @SerializedName("data")
    private List<DataData> data;

    public static LeftMenuBean objectFromData(String str) {

        return new Gson().fromJson(str, LeftMenuBean.class);
    }

    public static List<LeftMenuBean> arrayLeftMenuBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<LeftMenuBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataData> getData() {
        return data;
    }

    public void setData(List<DataData> data) {
        this.data = data;
    }

    public static class DataData {
        /**
         * id : 1
         * c_name : 美妆个护
         * subs : [{"id":"6","c_name":"面部护理","subs":[{"id":"36","c_name":"卸妆"},{"id":"37","c_name":"去角质"},{"id":"38","c_name":"洁面"},{"id":"39","c_name":"化妆水"},{"id":"40","c_name":"面部精华"},{"id":"41","c_name":"贴片型面膜"},{"id":"42","c_name":"涂抹型面膜"},{"id":"43","c_name":"乳液"},{"id":"44","c_name":"面霜"},{"id":"45","c_name":"防晒/修护"},{"id":"46","c_name":"眼部护理"},{"id":"47","c_name":"唇部护理"},{"id":"48","c_name":"美容油"}]},{"id":"7","c_name":"时尚彩妆","subs":[{"id":"49","c_name":"散粉"},{"id":"50","c_name":"腮红"},{"id":"51","c_name":"眉妆"},{"id":"52","c_name":"眼影"},{"id":"53","c_name":"眼线"},{"id":"54","c_name":"睫毛膏"},{"id":"55","c_name":"口红/唇蜜"},{"id":"56","c_name":"隔离/妆前"},{"id":"57","c_name":"粉底/BB"},{"id":"58","c_name":"遮瑕"},{"id":"242","c_name":"彩妆套装"}]},{"id":"8","c_name":"身体护理","subs":[{"id":"59","c_name":"身体清洁"},{"id":"60","c_name":"润体"},{"id":"61","c_name":"手足护理"}]},{"id":"9","c_name":"洗发护发","subs":[{"id":"63","c_name":"洗发水"},{"id":"64","c_name":"护发素"},{"id":"65","c_name":"护发精华"},{"id":"66","c_name":"生发"}]},{"id":"10","c_name":"美妆工具","subs":[{"id":"67","c_name":"美容仪器"},{"id":"68","c_name":"彩妆小工具"},{"id":"69","c_name":"护肤工具"},{"id":"196","c_name":"其他美妆工具"}]},{"id":"11","c_name":"个人护理","subs":[{"id":"70","c_name":"口腔护理"},{"id":"71","c_name":"眼罩"},{"id":"72","c_name":"卫生巾"}]}]
         */

        @SerializedName("id")
        private String id;
        @SerializedName("c_name")
        private String cName;
        @SerializedName("subs")
        private List<SubsDataX> subs;

        public static DataData objectFromData(String str) {

            return new Gson().fromJson(str, DataData.class);
        }

        public static List<DataData> arrayDataDataFromData(String str) {

            Type listType = new TypeToken<ArrayList<DataData>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getCName() {
            return cName;
        }

        public void setCName(String cName) {
            this.cName = cName;
        }

        public List<SubsDataX> getSubs() {
            return subs;
        }

        public void setSubs(List<SubsDataX> subs) {
            this.subs = subs;
        }

        public static class SubsDataX {
            /**
             * id : 6
             * c_name : 面部护理
             * subs : [{"id":"36","c_name":"卸妆"},{"id":"37","c_name":"去角质"},{"id":"38","c_name":"洁面"},{"id":"39","c_name":"化妆水"},{"id":"40","c_name":"面部精华"},{"id":"41","c_name":"贴片型面膜"},{"id":"42","c_name":"涂抹型面膜"},{"id":"43","c_name":"乳液"},{"id":"44","c_name":"面霜"},{"id":"45","c_name":"防晒/修护"},{"id":"46","c_name":"眼部护理"},{"id":"47","c_name":"唇部护理"},{"id":"48","c_name":"美容油"}]
             */

            @SerializedName("id")
            private String id;
            @SerializedName("c_name")
            private String cName;
            @SerializedName("subs")
            private List<SubsData> subs;

            public static SubsDataX objectFromData(String str) {

                return new Gson().fromJson(str, SubsDataX.class);
            }

            public static List<SubsDataX> arraySubsDataXFromData(String str) {

                Type listType = new TypeToken<ArrayList<SubsDataX>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getCName() {
                return cName;
            }

            public void setCName(String cName) {
                this.cName = cName;
            }

            public List<SubsData> getSubs() {
                return subs;
            }

            public void setSubs(List<SubsData> subs) {
                this.subs = subs;
            }


        }
    }
}
